<template>
  <div class="app-container">
<div class="filter-container">
    <el-button class="filter-item" style="margin-left: 10px;" type="primary" >
        {{cate_name}}
      </el-button>
   </div>
    <el-table :data="list" style="width: 100%;padding-top: 15px;" >
      <el-table-column label="标题" min-width="200" @click="click">
        <template slot-scope="scope" >

               <el-popover trigger="hover" placement="top" :title="scope.row.title"
    width="600">
                    <p>{{ scope.row.content }}</p>
                    <div slot="reference" class="name-wrapper">
                      {{ scope.row.title  }}</div>
                  </el-popover>
        </template>
      </el-table-column>
      <el-table-column label="时间" width="195" align="center">
        <template slot-scope="scope">
          {{ scope.row.create_time | formatDate }}
        </template>
      </el-table-column>

      </el-table-column>
    </el-table>
  </div>
</template>

<script>
  import {
    formatDate
  } from '@/utils/formatDate.js'
  export default {
    filters: {
      formatDate(time) {
        time = time * 1000
        let date = new Date(time)
        return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
      }
    },
    data() {
      return {

      }
    },
    props:["list","cate_name"],
    created() {

    },
    methods: {
      click() {
          console.log("dadad")

      }
    }
  }
</script>
